package com.community.admin.modules.contents;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.community.admin.modules.vo.MyPageVo;
import com.community.common.core.utils.Result;
import com.community.feign.contents.dto.TopicDTO;
import com.community.feign.contents.topic.TopicFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("contents/topic")
public class TopicController {

    @Autowired
    private TopicFeign topicFeign;

    @PostMapping("page")
    public Result<Page<TopicDTO>> page(@RequestBody MyPageVo<TopicDTO> params){
        return topicFeign.page(params);
    }

    @PostMapping
    public boolean save(@RequestBody TopicDTO dto){
        return topicFeign.save(dto);
    }


}
